import Vue from 'vue'
import App from './App'
import dayjs from './uni_modules/uview-ui/libs/util/dayjs'
// vuex
import store from './store'
// 引入全局uView
import uView from '@/uni_modules/uview-ui'

Vue.prototype.$store = store

Vue.config.productionTip = false

App.mpType = 'app'
Vue.use(uView)

Vue.filter('toDatetime', function (v) {
  return dayjs(v).format('YYYY-MM-DD HH:mm:ss')
})
Vue.prototype.$dayjs = dayjs
const globalMixin = require('@/common/mixin.js')
Vue.mixin(globalMixin)

import _plugin from './util/index'
Vue.use(_plugin)

const app = new Vue({
  store,
  ...App,
})

// 引入请求封装
require('./util/request/index')(app)

app.$mount()
